com.rscja.deviceapi.interfaces

## Interface IBluetoothReader

- All Superinterfaces:
    IReader
  All Known Subinterfaces:
    IUhfBle
  All Known Implementing Classes:
    BluetoothReader, BluetoothReader_qcom, EmptyUhfBle, RFIDWithUHFBLE, RFIDWithUHFBLE_qcom, RFIDWithUHFBLEN51_qcom, RFIDWithUHFBLEN52_qcom, UHFTemperatureTag, UHFTemperatureTag.RFIDWithUHFBLEN51, UHFTemperatureTag.RFIDWithUHFBLEN52, UHFTemperatureTagsBLEAPI

      public interface IBluetoothReader
      extends IReader

  蓝牙读写器的接口
  Interface of Bluetooth reader.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `VERSION_BT_FIRMWARE`
    `static java.lang.String` | `VERSION_BT_HARDWARE`
    `static java.lang.String` | `VERSION_BT_SOFTWARE`

    - ### Fields inherited from interface com.rscja.deviceapi.interfaces.IReader

      `UPDATE_STM32`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `connect(java.lang.String address)` 连接蓝牙(Connect Bluetooth)
    `void` | `connect(java.lang.String address, ConnectionStatusCallback<java.lang.Object> btStatusCallback)` 连接蓝牙(Connect Bluetooth)
    `void` | `disconnect()` 断开蓝牙(Disconnect Bluetooth)
    `boolean` | `free()` 释放蓝牙相关的资源(free Bluetooth resources)
    `int` | `getBeep()`
    `java.lang.String` | `getBleHardwareVersion()`
    `java.util.HashMap<java.lang.String,java.lang.String>` | `getBluetoothVersion()` 获取蓝牙版本号(acquire Bluetooth version)
    `ConnectionStatus` | `getConnectStatus()` 获取蓝牙连接状态(Acquire Bluetooth connection status)
    `boolean` | `init(android.content.Context context)` 初始化蓝牙相关的服务(Intialize Bluetooth services)
    `boolean` | `sendData(byte[] sendData)` 发送指令(send data)
    `void` | `setConnectionStatusCallback(ConnectionStatusCallback<java.lang.Object> btStatusCallback)` 设置蓝牙连接状态的回调(Setup Bluetooth connection status call back)
    `void` | `setOnDataChangeListener(BluetoothReader.OnDataChangeListener onDataChangeListener)`
    `boolean` | `setRemoteBluetoothName(java.lang.String name)` 修改蓝牙名称(Change Bluetooth device Name)
    `void` | `startScanBTDevices(ScanBTCallback scanBTCallback)` 扫描蓝牙设备(scanning Bluetooth devices)
    `boolean` | `stopScanBarcode()`
    `void` | `stopScanBTDevices()` 停止扫描蓝牙设备(Stop scanning Bluetooth devices)

    - ### Methods inherited from interface com.rscja.deviceapi.interfaces.IReader

      `blinkOfLed, closeLed, getBarcodeTypeInSSIID, getBattery, getParameter, getSTM32Version, openLed, scanBarcode, scanBarcodeToBytes, setBarcodeTypeInSSIID, setBeep, setKeyEventCallback, setParameter, startScanBarcode, triggerBeep`

- - ### Field Detail

    - #### VERSION_BT_FIRMWARE

          static final java.lang.String VERSION_BT_FIRMWARE

      See Also:
        Constant Field Values

    - #### VERSION_BT_HARDWARE

          static final java.lang.String VERSION_BT_HARDWARE

      See Also:
        Constant Field Values

    - #### VERSION_BT_SOFTWARE

          static final java.lang.String VERSION_BT_SOFTWARE

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### init

          boolean init(android.content.Context context)

      初始化蓝牙相关的服务(Intialize Bluetooth services)
      Parameters:
        `context` - context
      Returns:
        true:成功(success) false:失败(failure)

    - #### free

          boolean free()

      释放蓝牙相关的资源(free Bluetooth resources)
      Returns:
        true:成功(success) false:失败(failure)

    - #### startScanBTDevices

          void startScanBTDevices(ScanBTCallback scanBTCallback)

      扫描蓝牙设备(scanning Bluetooth devices)
      Parameters:
        `scanBTCallback` - 扫描结果回调(scanning result call back)

    - #### stopScanBTDevices

          void stopScanBTDevices()

      停止扫描蓝牙设备(Stop scanning Bluetooth devices)

    - #### setConnectionStatusCallback

          void setConnectionStatusCallback(ConnectionStatusCallback<java.lang.Object> btStatusCallback)

      设置蓝牙连接状态的回调(Setup Bluetooth connection status call back)
      Parameters:
        `btStatusCallback` - 蓝牙连接状态回调接口(Bluetooth connection status call back)

    - #### connect

          void connect(java.lang.String address)

      连接蓝牙(Connect Bluetooth)
      Parameters:
        `address` - 蓝牙地址(Bluetooth address)

    - #### connect

          void connect(java.lang.String address,
                       ConnectionStatusCallback<java.lang.Object> btStatusCallback)

      连接蓝牙(Connect Bluetooth)
      Parameters:
        `address` - 蓝牙地址(Bluetooth address )
        `btStatusCallback` - 蓝牙连接状态回调接口(Bluetooth connection status call back)

    - #### disconnect

          void disconnect()

      断开蓝牙(Disconnect Bluetooth)

    - #### getConnectStatus

          ConnectionStatus getConnectStatus()

      获取蓝牙连接状态(Acquire Bluetooth connection status)
      Returns:
        返回蓝牙连接状态(Return Bluetooth connection status)

    - #### sendData

          boolean sendData(byte[] sendData)

      发送指令(send data)
      Returns:
        true:成功(success) false:失败(failure)

    - #### setRemoteBluetoothName

          boolean setRemoteBluetoothName(java.lang.String name)

      修改蓝牙名称(Change Bluetooth device Name)
      Parameters:
        `name` - 新的蓝牙名称(New Bluetooth name)
      Returns:
        true:成功(success) false:失败(failure)

    - #### getBluetoothVersion

          java.util.HashMap<java.lang.String,java.lang.String> getBluetoothVersion()

      获取蓝牙版本号(acquire Bluetooth version)
      Returns:
        key:`VERSION_BT_FIRMWARE` 表示固件版本(Firmware Version), key:`VERSION_BT_HARDWARE` 表示硬件版本(Hardware version) ， key:`VERSION_BT_SOFTWARE` 表示软件版本(software version)

    - #### getBleHardwareVersion

          java.lang.String getBleHardwareVersion()

    - #### setOnDataChangeListener

          void setOnDataChangeListener(BluetoothReader.OnDataChangeListener onDataChangeListener)

    - #### stopScanBarcode

          boolean stopScanBarcode()

      Returns:

    - #### getBeep

          int getBeep()